<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="{$smarty.const.ADMIN_CSS_PATH}style.css" rel="stylesheet" type="text/css" />
<!--<link href="{$smarty.const.CSS_PATH}bootstrap.min.css" rel="stylesheet" type="text/css" />-->
<link href="css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{$smarty.const.ADMIN_JS_PATH}jquery.js"></script>
<script type="text/javascript" src="js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="js/select-ui.min.js"></script>
<script type="text/javascript" src="editor/kindeditor.js"></script>

<script type="text/javascript">
    KE.show({
        id : 'content7',
        cssPath : './index.css'
    });
  </script>
  
<script type="text/javascript">
$(document).ready(function() {
	$(".select3").uedSelect({
		width : 100
	});
});
function setf(s){
	var thisurl="{$smarty.const.__CONTROLLER__}/changestatus";
	$.post(thisurl,"id="+s.dataset.href,function(msg){
	//alert(msg);
	s.innerHTML=msg;
	//$(this).append("<i>"+msg+"</i>");
});
}

function del(){ 
if(!confirm("确认要删除？")){ 
window.event.returnValue = false; 
} 
}
</script>
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">用户管理</a></li>
    <li><a href="#">用户列表</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    
    <div id="usual1" class="usual"> 
    
    <div class="itab">
  	<ul> 
    <li><a href="#tab1" class="selected">所有用户</a></li> 
  	</ul>
    </div> 
    
    
  	<div id="tab2" class="tabson">
    <form action="{$smarty.const.__SELF__}" method="post">
    <ul class="seachform">
    <li><label>查询关键字</label><input name="key" id="key" type="text" class="scinput" /></li>
    
    <li><label>查询条件:</label>  
    <select class="select3" name="term" id="term" style="margin-top: 6px;">
    <option value="id">编号</option>
    <option value="name">姓名</option>
    <option value="email">邮箱</option>
    <option value="phone">联系方式</option>
    </select>
    </li>
    
    <li><label>性别:</label>  
    <select class="select3" name="sex" id="sex" style="margin-top: 6px;">
    <option value="">所有</option>
    <option value="男">男</option>
    <option value="女">女</option>
    </select>
    </li>
    
    <li><label>账号状态:</label>  
    <select class="select3" name="status" id="status" style="margin-top: 6px;">
    <option value="">所有</option>
    <option value="1">正常</option>
    <option value="0">冻结</option>
    
    </select>
    </li>
    
    <li><label>排序方式:按</label>  
    <select class="select3" name="method" id="method" style="margin-top: 6px;">
    <option value="id">编号</option>
    <option value="name">姓名</option>
    <option value="email">邮箱</option>
    <option value="phone">联系方式</option>
    </select>
    </li>
    
    <li> 
    <select class="select3" name="order" id="order" style="margin-top: 6px;">
    <option value="asc">升序</option>
    <option value="desc">降序</option>
    </select>
    </li>
    
    <li style="margin-top: 6px;"><input type="checkbox" name="isexact" id="isexact"/>精确搜索 </li>
    
    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
    
    </ul>
    </form>
    
    <table class="imgtable">
    
    <thead>
    <tr>
    <th><input name="" type="checkbox" value="" checked="checked"/></th>
    <th width="100px;">头像</th>
    <th>编号</th>
    <th>昵称</th>
    <th>密码</th>
    <th>性别</th>
    <th>邮箱</th>
    <th>联系方式</th>
    <th>余额</th>
    <th>积分</th>
    <th style="text-align: center;">操作</th>
    </tr>
    </thead>
    
    <tbody>
    {foreach $info as $k=>$v}
    <tr>
    <td><input name="" type="checkbox" value=""/></td>
    <td class="imgtd"><img src="{$smarty.const.SITE_URL}{$v.touxiang}" style="width: 80px;height: 60px;"/></td>
    <td>{$v.id}</td>
    <td>{$v.name}</td>
    <td>{$v.password}</td>
    <td>{$v.sex}</td>
    <td>{$v.email}</td>
    <td>{$v.phone}</td>
    <td>{$v.money}</td>
    <td>{$v.score}</td>
    <td>
    <a href="{$smarty.const.__CONTROLLER__}/edituser/id/{$v.id}" >编辑</a>&nbsp;&nbsp;&nbsp;
    <a class="status" data-href="{$v.id}"  onclick="setf(this)">{if $v.status==1}冻结{else}<i>解冻</i>{/if}</a>&nbsp;&nbsp;&nbsp;
    <a href="{$smarty.const.__CONTROLLER__}/deleteuser/id/{$v.id}"  onclick="return del()"> 删除</a>
    </td>
    </tr>
    {/foreach}
    </tbody>
    </table>
    
    <div class="pagin">
    	<div class="message">共<i class="blue">{$total}</i>条记录，每页显示&nbsp;<i class="blue">10&nbsp;</i>条</div>
        <ul class="paginList">
        	{$pagelist}
        </ul>
    </div>
    
    
    </div>  
       
	</div> 
	
 
	<script type="text/javascript"> 
      $("#usual1 ul").idTabs(); 
    </script>
    
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>
    
    
    
    
    
    </div>

</body>
</html>
